<template>
  <VSnakeModal
    v-model="visible"
    :modalTitle="modalTitle"
    style="width: 100%; height: 100%;"
    :showHeader="false"
    get-container=".home-view"
  >
    <div class="game-prop-panel">
      <div class="prop-panel-header">
        <div class="go-back" @click="goBack">
          <div class="go-back-icon click-dh">fh</div>
          游戏道具
        </div>
        <!--积分-->
      <div class="accumulated-scores click-dh">
        <div class="accumulated-img">
          <img src="@/assets/snake/body-4.png" alt="">
        </div>
        <div class="accumulated-num">
          0
        </div>
      </div>
      </div>

      <div class="panel-content">
        <div class="game-prop-list">
          <div
            v-for="item in propList"
            :key="item.code"
            class="prop-item"
          >
            <div class="prop-label">{{ item.label }}</div>
            <div class="prop-icon">
              <img src="@/assets/snake/body-3.png" alt="">
            </div>
            <p style="text-align: center; font-size: 1rem; line-height: 1; padding: 0.6rem;">游戏结束后使用复活卡进行复活</p>
            <div class="exchange-btn click-dh">
              <div class="exchange-icon"></div>
              5</div>
          </div>
        </div>
      </div>
    </div>
  </VSnakeModal>
</template>

<script>

export default {
  name: 'VGamePropModal',
  components: {
  },
  data() {
    return {
      visible: false,
      modalTitle: '123',
      propList: [
        { code: 'fuhu',label: '复活卡'},
        { code: 'speed',label: '加速卡'},
        { code: 'hundun',label: '护盾卡'},
        { code: 'shuangb',label: '双倍卡'},
        { code: 'addleng',label: '加长卡'},
      ],
    };
  },

  mounted() {
    
  },

  methods: {
    openModal() {
      this.visible = true
    },
    goBack() {
      this.visible = false
    }
  },
};
</script>

<style lang="scss">
.game-prop-panel {
  position: relative;
  width: 100%;
  height: 100%;
  background: url('@/assets/scss/background.png') 0 0 no-repeat;
  background-size: 100%;
  .prop-panel-header {
    height: 4rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: auto;
    .accumulated-img {
      top: 1rem;
    }
    .accumulated-num {
      top: 1.4rem;
    }
  }
  .go-back {
    display: flex;
    align-items: center;
    .go-back-icon {
      width: 2.4rem;
      height: 2.4rem;
      background-color: #fff;
      border-radius: 1rem;
      border: 0.1rem solid rgb(255, 146, 146);
      margin: 0 0.6rem;
      text-align: center;
      line-height: 2.4rem;
    }
  }
  .panel-content {
    height: calc(100% - 4rem);
    width: 100%;
    overflow: auto;
  }
  .game-prop-list {
    padding: 0.6rem 4rem;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    .prop-item {
      flex-shrink: 0;
      width: 9rem;
      height: 14.4rem;
      border: 0.1rem solid rgb(255, 161, 161);
      border-radius: 0.5rem;
      margin: 0.3rem;
    }
    .prop-label {
      text-align: center;
      font-size: 1.5rem;
      line-height: 3rem;
    }
    .prop-icon {
      width: 4rem;
      height: 4rem;
      background-color: #f00;
      border-radius: 50%;
      margin: 0.5rem auto;
      overflow: hidden;
      img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
      }
    }
    .exchange-btn {
      width: 6rem;
      height: 2rem;
      line-height: 2rem;
      margin: 0 auto;
      text-align: center;
      border-radius: 2rem;
      background-color: #f00;
      color: #fff;
      overflow: hidden;
      position: relative;
    }
    .exchange-icon {
      width: 1.5rem;
      height: 1.5rem;
      border-radius: 50%;
      background-color: antiquewhite;
      position: absolute;
      left: 0.25rem;
      top: 0.25rem;
    }
  }
}
</style>